<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <style>
        body{background: white;width: 100%}
        .color{ color: #1E9FFF!important;font-weight: bold}
        .select input{height: 35px!important;width: 200px}
    </style>
</head>
<body>
<!--<span class="layui-breadcrumb" style="margin-left: 10px;margin-top: 6px;display: block">-->
<!--<span class="color">学籍信息&nbsp;-&nbsp;单一查询</span>-->
<!--</span>-->
<fieldset class="layui-elem-field site-demo-button" style="margin-top: 10px;width: 100%;">
    <legend style="font-size: 14px"><span class="color">学籍分班</span></legend>
    <div class="layui-form select">
        <table class="layui-table">
            <tr>
                <td style="border: none">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:90px;">年级</label>
                        <div class="layui-input-inline" style="height: 30px">
                            <select name="quiz">
                                <option value="">请选择</option>
                                <option value="1">2017</option>
                                <option value="2">2016</option>
                                <option value="3">2015</option>
                                <option value="4">2014</option>
                            </select>
                        </div>
                    </div>
                </td>
                <td style="border: none">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:90px;">单位</label>
                        <div class="layui-input-inline" style="height: 30px">
                            <select name="quiz">
                                <option value="">请选择</option>
                                <option value="1">学生处</option>
                                <option value="2">信息工程学院</option>
                                <option value="3">文化传媒学院</option>
                                <option value="4">高职学院</option>
                                <option value="5">建筑学院</option>
                            </select>
                        </div>
                    </div>
                </td>
                <td style="border: none">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:90px;">专业</label>
                        <div class="layui-input-inline" style="height: 30px">
                            <select name="quiz">
                                <option value="">请选择</option>
                                <option value="1">软件工程</option>
                                <option value="2">网络工程</option>
                                <option value="3">土木工程</option>
                                <option value="4">工程造价</option>
                                <option value="5">新闻管理</option>
                            </select>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="border: none">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:90px;">对象</label>
                        <div class="layui-input-inline" style="height: 30px">
                            <select name="quiz">
                                <option value="">请选择</option>
                                <option value="1">全部</option>
                                <option value="2">未分班</option>
                            </select>
                        </div>
                    </div>
                </td>
                <td style="border: none">

                </td>
                <td colspan="2" style="border: none">

                </td>
            </tr>
        </table>
    </div>
</fieldset>
<div class="left" style="float: left;width: 30%;min-height: 500px;border: 1px solid white;margin-left: 1%">
<table class="layui-table" lay-size="sm">
    <thead>
        <td>班</td>
        <td>名额</td>
        <td>余额</td>
    </thead>
    <tr>
        <td>统本软件1401</td>
        <td>60</td>
        <td>20</td>
    </tr>
    <tr>
        <td>统本软件1402</td>
        <td>60</td>
        <td>20</td>
    </tr>
    <tr>
        <td>统本软件1403</td>
        <td>60</td>
        <td>20</td>
    </tr>
    <tr>
        <td colspan="2">
            <div class="layui-inline layui-form">
                <div class="layui-input-inline">
                    <select name="quiz" style="height: 20px" >
                        <option value="">请选择</option>
                        <option value="1">统本软件1401</option>
                        <option value="1">统本软件1402</option>
                        <option value="1">统本软件1403</option>
                    </select>
                </div>
            </div>
        </td>
        <td>
            勾选人数：0人
        </td>
    </tr>
</table>
</div>
<div class="right" style="float: left;width: 60%;min-height: 500px;border: 1px solid white;margin-left: 2%">
    <table class="layui-table" lay-size="sm">
        <thead>
            <td><input type="checkbox"></td>
            <td>序号</td>
            <td>学号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>班</td>
        </thead>
        <tr>
            <td><input type="checkbox"></td>
            <td>01</td>
            <td>1461080115231</td>
            <td>黄森</td>
            <td>男</td>
            <td>统本软件1401</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>02</td>
            <td>14520201157948</td>
            <td>代江平</td>
            <td>男</td>
            <td>统本软件1402</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>03</td>
            <td>14521231157948</td>
            <td>司鑫</td>
            <td>男</td>
            <td>统本软件1403</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>04</td>
            <td>1461080115231</td>
            <td>黄森</td>
            <td>男</td>
            <td>统本软件1401</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>05</td>
            <td>14520201157948</td>
            <td>代江平</td>
            <td>男</td>
            <td>统本软件1402</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>06</td>
            <td>14521231157948</td>
            <td>司鑫</td>
            <td>男</td>
            <td>统本软件1403</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>07</td>
            <td>1461080115231</td>
            <td>李鹏</td>
            <td>男</td>
            <td>统本软件1401</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>08</td>
            <td>14520211157948</td>
            <td>黎明</td>
            <td>男</td>
            <td>统本软件1402</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>09</td>
            <td>14521231587948</td>
            <td>张娜</td>
            <td>女</td>
            <td>统本软件1403</td>
        </tr>
        <tr>
            <td colspan="6" style="text-align: center">
                <button class="layui-btn layui-btn-sm layui-btn-normal">保存</button>
            </td>
        </tr>
    </table>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../layui/jquery-1.12.4.min.js"></script>
<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>
</body>
</html>
